package gui;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.LayoutManager;

import javax.swing.JFrame;
import javax.swing.tree.DefaultMutableTreeNode;


public class SecondFrame extends JFrame{

	/**
	 * 
	 */
	private static final long serialVersionUID = -2448088243058062181L;
	
	final int MIN_WIDTH = 502;				// window size, width
	final int MIN_HEIGHT = 500;				// window size, height
	
	private LayoutManager layoutManager;
	private Tree tree = new Tree();

	
	public SecondFrame(JFrame mainFrame) {
		this.setLocation(mainFrame.getWidth() + mainFrame.getLocation().x, mainFrame.getLocation().y);
		this.setMinimumSize(new Dimension(MIN_WIDTH,MIN_HEIGHT)); 	// sets minimum frame size
		this.setTitle("Decision tree");								//set frame title
		
		layoutManager=new BorderLayout(); 
		setLayout(layoutManager);
		
		setDefaultCloseOperation(EXIT_ON_CLOSE);

	    getContentPane().add(tree,BorderLayout.CENTER);
	    
//	    DefaultMutableTreeNode root = tree.addRootNode("test");
//	    tree.addChild(root, "test2");
	    
//	    tree.reload();
	    
	}
	
	public Tree getTree() {
		return tree;
	}
	
	



}
